﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"/>
    <title>数据结构</title>
    <link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../../Scripts/QueryString.js" type="text/javascript"></script>
    <script src="../../Scripts/config.js" type="text/javascript"></script>
    <script src="../Gener.js" type="text/javascript"></script>
    <script src="../../Scripts/EasyUIUtility.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/bootstrap/js/jquery.min.js"></script>
    <script src="../../Scripts/config.js" type="text/javascript"></script>
    <link href="../../Scripts/easyUI/themes/gray/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/easyUI/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
    <base target="_self" /> 
    <script language="javascript" type="text/javascript" >
        //页面启动函数.
        $(function () {

            $("#Msg").html("<img src=../../Img/loading.gif />&nbsp;正在加载,请稍后......");

            var handler = new HttpHandler("BP.WF.HttpHandler.WF_Comm_Sys");

            var data = handler.DoMethodReturnJSON("SystemClass_Init");

            var html = "<table border=0 style='width:98%;'>";
            html += "<caption>系统实体表结构</caption>";
            html += "<tr>";
            html += "<th>序号</th>";
            html += "<th>类名</th>";
            html += "<th>名称</th>";
            html += "<th>表</th>";
            html += "<th>操作1</th>";
            html += "<th>操作2</th>";
            html += "<th>操作3</th>";
            html += "</tr>";

            var isTr = false;
            for (var i = 0; i < data.length; i++) {

                var en = data[i];
                //  var str = JSON.stringify(en);

                if (isTr == true)
                    html += "<tr style='background-color:#F4F4F4;' ondblclick=\"OpenFeild('" + en.EnsName + "','" + en.Name + "');\" >";
                else
                    html += "<tr ondblclick=\"OpenFeild('" + en.EnsName + "','" + en.Name + "');\"  >";
                isTr = !isTr;

                html += "<td>" + i + "</td>";
                html += "<td>" + en.No + "</td>";
                html += "<td>" + en.Name + "</td>";
                html += "<td>" + en.PTable + "</td>";
                html += "<td><a href=\"javascript:OpenFeild('" + en.EnsName + "','" + en.Name + "')\">字段</a></td>";
                html += "<td><a href=\"javascript:OpenCheck('" + en.No + "','" + en.Name + "')\">体检</a></td>";
                html += "<td><a href=\"javascript:OpenEn('" + en.EnsName + "','" + en.Name + "')\">界面</a></td>";
                html += "</tr>";
            }

            $("#Msg").html(html);

        });

         function OpenFeild(m,name) {
             var url = 'SystemClassField.htm?EnsName=' + m;
             OpenEasyUiDialog(url, "eudlgframe", name, 800, 550, "icon-edit", true, null, null, null, function () {
                //window.location.href = window.location.href;
            });
        }

        function OpenEn(m, name) {
            m = m.substring(0, m.length - 1);
            var url = '../En.htm?EnName=' + m;
            OpenEasyUiDialog(url, "eudlgframe",name, 700, 550, "icon-edit", true, null, null, null, function () {
              //  window.location.href = window.location.href;
            });
        }

        function OpenCheck(ensName, name) {

            var url = 'SystemClassCheck.htm?EnName=' + ensName;

            OpenEasyUiDialog(url, "eudlgframe", name, 800, 550, "icon-edit", true, null, null, null, function () {
                //window.location.href = window.location.href;
            });
        }
        
    </script>

</head>

<body style="padding:15px; margin:15px;">

<form id="cc">
<div style=" padding:10px;" id="Msg">
<img src="../../Img/loading.gif" />&nbsp;正在加载,请稍后......</div>
</form>

</body>
</html>
